//
//  YJSalesTopicListdetailsCell.m
//  SnackCourier
//
//  Created by qianfeng01 on 15/7/22.
//  Copyright (c) 2015年 qianfeng01. All rights reserved.
//

#import "YJSalesTopicListdetailsCell.h"
#import "UIImageView+WebCache.h"

@implementation YJSalesTopicListdetailsCell

- (void)awakeFromNib {
    // Initialization code
}



-(void)showDataWithModel:(YJSalesTopicListdetailsModel *)model{
    if (model.title.length!=0) {
        self.titleLabel.text =model.title;
    }else{
        self.titleLabel.text =@"";
    }
    
    [self.imgUrlimageView sd_setImageWithURL:[NSURL URLWithString:model.imgUrl]];
    self.website.text=model.website;
    self.priceStr.text =[NSString stringWithFormat:@"￥%@",model.priceStr];
    if (model.originalPriceStr.length !=0) {
         self.originalPriceStr.text =[NSString stringWithFormat:@"￥%@",model.originalPriceStr];
    }else{
        self.originalPriceStr.text=@"";
    }
    
   
    if (model.salesVolume !=0) {
        self.salesVolumeLabel.text =[NSString stringWithFormat:@"月销量%ld",(long)model.salesVolume];
    }else{
        self.salesVolumeLabel.text =@"";
    } 
    
}
-(void)showDataWithfollowModel:(YJcateclassFollowModel *)model{
    if (model.title.length!=0) {
        self.titleLabel.text =model.title;
    }else{
        self.titleLabel.text =@"";
    }
    
    [self.imgUrlimageView sd_setImageWithURL:[NSURL URLWithString:model.imgUrl]];
    self.website.text=model.website;
    self.priceStr.text =[NSString stringWithFormat:@"￥%@",model.priceStr];
    if (model.originalPriceStr.length !=0) {
        self.originalPriceStr.text =[NSString stringWithFormat:@"￥%@",model.originalPriceStr];
    }else{
        self.originalPriceStr.text=@"";
    }
    
    if (model.salesVolume !=0) {
        self.salesVolumeLabel.text =[NSString stringWithFormat:@"月销量%ld",(long)model.salesVolume];
    }else{
        self.salesVolumeLabel.text =@"";
    }
}

@end
